let loginUrl = "/wx/login"  //登录
let deviceListUrl = "/wx/device/list"  //设备列表
let deviceAddUrl = "/wx/device/add"  //新增设备
let deviceCheckAddUrl = "/wx/repairOrder/add"  //仪器报修
let deviceCheckListUrl = "/wx/repairOrder/list"  //报修列表
let deviceCheckEditUrl = "/wx/repairOrder/edit"  //维修
let deviceCheckDetailUrl = "/wx/repairOrder/detail" //维修详情
let deviceCheckSignUrl = "/wx/repairOrder/assign" //维修订单指派
let deviceAssignListUrl = "/wx/repairOrder/assignList" //指派给员工的维修订单

let deviceNoticeUrl = "/wx/deviceNotice/count" // 通知消息
let noticeListUrl = "/wx/deviceNotice/list"


let repairListUrl = "/wx/repair/list"  //维修记录列表
let repairDetailUrl = "/wx/repair/detail"  //维修记录列表

 
 
let checklistUrl = "/wx/check/list"  //期间核查列表
let checkAddUrl = "/wx/check/add"  //期间核查新增
let checkDetailUrl = "/wx/check/detail"  //期间核查新增

let deviceinfoUrl = "/wx/device/detail"  //设备详情
let detailInfoBySnUrl = "/wx/device/detailBySn"  //设备详情
let inspectlistUrl = "/wx/inspect/list"  //巡检列表
let inspectAddUrl = "/wx/inspect/add" // 巡检记录新增
let inspectDetailUrl = "/wx/inspect/detail" // 巡检详情

let mainListUrl = "/wx/maintenance/list"  //保养列表
let mainAddUrl = "/wx/maintenance/add" // 保养记录新增
let mainDetailUrl = "/wx/maintenance/detail" // 保养详情

let userListUrl = "/wx/user/getUserList" // 保养详情
let uploadUrl = "/wx/upload" // 图片上传


const install = (Vue, vm) => {
	let login = (params) => vm.$xt.post(loginUrl,params,{noToken:true});
	let deviceList = (params) => vm.$xt.post(deviceListUrl,params);
	let deviceAdd = (params) => vm.$xt.post(deviceAddUrl,params);
	let deviceCheckAdd = (params) => vm.$xt.post(deviceCheckAddUrl,params);
	let deviceCheckList = (params) => vm.$xt.post(deviceCheckListUrl,params);
	let deviceCheckEdit = (params) => vm.$xt.post(deviceCheckEditUrl,params);
	let deviceCheckDetail = (params) => vm.$xt.post(deviceCheckDetailUrl+"/"+params.id);
	let deviceCheckSign = (params) => vm.$xt.post(deviceCheckSignUrl,params);
	let deviceAssignList = (params)=>vm.$xt.post(deviceAssignListUrl);
	
	let deviceNotice = (params) => vm.$xt.post(deviceNoticeUrl,params);
	let noticeList = (params) => vm.$xt.post(noticeListUrl,params);
	let repairList = (params) => vm.$xt.post(repairListUrl,params);
	let repairDetail = (params) => vm.$xt.post(repairDetailUrl+"/"+params.id);
	
	
	let checklist = (params) => vm.$xt.post(checklistUrl,params);
	let checkAdd  = (params) => vm.$xt.post(checkAddUrl,params);
	let checkDetail = (params) => vm.$xt.post(checkDetailUrl+"/"+params.id);
	
	let deviceinfo = (params) => vm.$xt.get(deviceinfoUrl+"/"+params.sn);
	let detailInfoBySn = (params) => vm.$xt.get(detailInfoBySnUrl+"/"+params.sn);
	
	let inspectlist = (params) => vm.$xt.post(inspectlistUrl,params);
	let inspectAdd = (params) => vm.$xt.post(inspectAddUrl,params);
	let inspectDetail = (params) => vm.$xt.post(inspectDetailUrl+"/"+params.id);
	
	let mainList = (params) => vm.$xt.post(mainListUrl,params);
	let mainAdd = (params) => vm.$xt.post(mainAddUrl,params);
	let mainDetail = (params) => vm.$xt.post(mainDetailUrl+"/"+params.id);
	
	let userList = (params) => vm.$xt.get(userListUrl,params);
	let upload = (params) => vm.$xt.post(uploadUrl,params);
	let imgTobase = (params) =>vm.$xt.imgGet(params);
	
	vm.$xt.baseObject = {
		login,
		deviceList,
		deviceAdd,
		deviceCheckAdd,
		deviceCheckList,
		deviceCheckEdit,
		deviceCheckDetail,
		deviceCheckSign,
		deviceAssignList,
		
		deviceNotice,
		noticeList,
		repairList,
		repairDetail,
		
		checklist,
		checkAdd,
		checkDetail,
		
		deviceinfo,
		detailInfoBySn,
		inspectlist,
		inspectAdd,
		inspectDetail,
		mainAdd,
		mainList,
		mainDetail,
		
		userList,
		upload,
		imgTobase
	}
}

export default {
	install
}